package com.example.rocketmq.mq;

import com.example.rocketmq.channel.MyChannel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

@Slf4j
@EnableBinding(MyChannel.class)
public class ReceiveMQ {

    @StreamListener(MyChannel.INPUT)
    public void receive(String entity){
        log.info("收到消费消息:{}",entity);
    }
}

